package ynu.edu.order.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import ynu.edu.common.result.Result;
import ynu.edu.order.vo.UserVO;

/**
 * 用户服务Feign客户端
 */
@FeignClient(name = "user-service", fallback = UserClientFallback.class)
public interface UserClient {

    /**
     * 根据用户ID获取用户信息
     * @param id 用户ID
     * @return 用户信息
     */
    @GetMapping("/internal/users/{id}")
    Result<UserVO> getUserById(@PathVariable("id") Long id);
} 